package org.example;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class blank {

    public static void main(String[] args) {
        System.out.println("69fc4bac54cfee3e752f9047890939cf".equals("69fc4bac54cfee3e752f9047890939cf"));
    }

    //            String appPackage = "com.android.contacts";
//            String appActivity = "com.android.contacts.activities.PeopleActivity";
//
//            driver.startActivity(new Activity(appPackage, appActivity));
//
//            boolean appInstalled = driver.isAppInstalled("com.tencent.android.qqdownloader");
//            log.error("appInstalled:{}", appInstalled);
    // 通过ID定位

    //            // 通过Xpath定位
//            element = driver.findElement(By.xpath("//android.widget.Button[@text='Click me']"));
//
//            // 通过ClassName定位
//            element = driver.findElement(By.className("android.widget.EditText"));

    // 列出目录中的文件
//    private static List<String> listFilesInDirectory(String directory) throws IOException {
//        Process process = Runtime.getRuntime().exec(new String[]{"adb", "shell", "ls", directory});
//        BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
//        String line;
//        List<String> files = new ArrayList<>();
//        while ((line = reader.readLine()) != null) {
//            files.add(line);
//        }
//        reader.close();
//        return files;
//    }


    //                long currentFileSize = getFileSize(downloadDir + "/" + currentFileName);
//                if (currentFileSize == -1) {
//                    // 获取文件大小失败，继续尝试
//                    log.error("获取文件大小失败，继续尝试");
//                    retryCount++;
//                    Thread.sleep(retryInterval);
//                    continue;
//                }


//    private static long getFileSize(String filePath) {
//        try {
//            Process process = Runtime.getRuntime().exec(new String[]{"adb", "shell", "stat", "-c", "%s", filePath});
//            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
//            String sizeStr = reader.readLine();
//            reader.close();
//            if (sizeStr != null && !sizeStr.isEmpty()) {
//                return Long.parseLong(sizeStr);
//            } else {
//                log.error("无法获取文件大小: {}", filePath);
//                return -1; // 返回-1表示获取大小失败
//            }
//        } catch (IOException | NumberFormatException e) {
//            log.error("获取文件大小时出错: {}", filePath, e);
//            return -1; // 返回-1表示获取大小失败
//        }
//    }
}
